package bat.iog.hytool.pattern.creator.singleton;

public class SingledonDemo01 {

    private static SingledonDemo01 instance = null;

    private SingledonDemo01() {
    }

    public SingledonDemo01 getInstance(){

        if (instance==null) {
            synchronized (SingledonDemo01.class){
                if (instance == null) {
                    instance = new SingledonDemo01();
                }
            }
        }
        return instance;
    }

}
